package com.qianli.cashmama.trade.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.qianli.cashmama.trade.dao.TOpenApiPushStatusDao;
import com.qianli.cashmama.trade.entity.TOpenApiPushStatusEntity;
import com.qianli.cashmama.trade.entity.vos.PushStatsVo;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * User: anonymous
 * Date: 2020-11-30
 * Time: 16:05:48.530
 */

@Repository
public class TOpenApiPushStatusDaoImpl extends AbstractBaseMapper<TOpenApiPushStatusEntity> implements TOpenApiPushStatusDao {

    @Override
    public TOpenApiPushStatusEntity selectOneByTradeNo(String tradeNo) {
        Map<String, String> paramsMap = new HashMap<>();
        paramsMap.put("tradeNo", tradeNo);
        return getSqlSession().selectOne(getStatement("selectOneByTradeNo"), paramsMap);
    }

    @Override
    public List<PushStatsVo> pushStatusStats() {
        Map<String, String> paramsMap = new HashMap<>();
        return getSqlSession().selectList(getStatement("pushStatusStats"), paramsMap);
    }
}